1. Technical Field
The present application relates to an image processing method, an image processing apparatus, an image forming apparatus, and a recording medium, in which classifications of pixels are discriminated per line and image processing is performed thereto.
2. Description of the Related Art
In image forming apparatuses, such as digital copying machines and multi-function printers, in order to perform image processing with an image processing method suitable for each individual read documents, auto color selection processing (hereinafter, it will be described as ACS processing) to determine whether these documents are chromatic documents or achromatic documents is often performed (refer to, for example, Japanese Patent Application Laid Open No. H4-282968).
In the conventional art, whether a chromatic pixel or an achromatic pixel is discriminated for each pixel, and then when presence of successive chromatic pixels more than a predetermined number is detected in the order of given pixels, the amount of pixels of the successive chromatic pixels is recognized as a chromatic block, and when there are chromatic blocks more than a predetermined number in one line, the line is counted as a chromatic line. Subsequently, when there are chromatic lines as many as a predetermined number in the document, it has been determined as a chromatic image, and when not, it has been determined as an achromatic image.
Since such ACS processing may give different results between cases of performing it to a whole area of the read document and to a partial area thereof it is preferable to perform the ACS processing only to an available image area corresponding to an image area to be outputted.
FIG. 1 and FIG. 2 are explanatory views illustrating examples in which determination results are different depending on the available image areas. FIG. 1 is an example when the ACS processing is performed to the whole document with respect to a document which has achromatic pixels and chromatic pixels. It has chromatic pixels at a rate equal to a determination criterion or more with respect to the pixel count in the whole document, so it is determined as a chromatic document. While a document shown in FIG. 2 is the same document as the document shown in FIG. 1, it is an example when the ACS processing is performed only to a left half area. Although it has chromatic pixels as the whole document, it is determined as an achromatic document since there are not chromatic pixels in the available image area at the rate equal to the determination criterion or more.
Similarly, there are document determination processing and undercolor recognition processing as image recognition processing performed only to the available image area to be outputted. There is a method in which when the document determination processing is performed to the document read from a scanner, pre-scan is performed to calculated a mean value of a difference between the numbers of pixels in a high density portion up to rising and falling, and the number of pixels in a low density portion from falling to rising with respect to line image data in the available image area, and features called a sum of a mean value of a difference between the numbers of pixels in the adjacent low density portions is calculated to thereby determine whether or not it is a text pixel, and then when there are text pixels at a rate equal to a threshold or more with respect to a total number of pixels in the area, it is recognized as a text document, and if not, as a photograph document or the like (refer to Japanese Patent Application Laid Open No. 2002-125121).
However, both of the ACS determination processing described in Patent Document 1 and the document discrimination processing described in Patent Document 2 are processing assuming that the document is put on a scanner platen, and image data of the whole document is read to then perform an ACS determination and a document type determination. For example, considering a case where the document is read per line by an automatic document feeder, there are problems that the available image area of the document is fixed when the back-end of the document is detected, and thus the ACS processing or the document type determination cannot be started before the whole document is once read and the available image area is fixed.
FIG. 3 is an explanatory view illustrating processing when the document is read per line by the automatic document feeder. When the document is read by a line scanner provided with an automatic document feeder, a back end position and a specific pixel width y are required in order to set an area CDEF with an area equal to the specific pixel width y from the back end with respect to a sub-scanning direction of the scan as an available image area. Since the width y is calculated from an output image size, a scaling, or the like, it can be fixed before the document is read. However, the area CDEF cannot be fixed until the back end of the document is detected by a document end detecting sensor of the line scanner. Namely, there are problems that it is necessary to store data read at least by the time when the back end is fixed, in a memory or the like, and to read the image data gain from the memory after it is fixed to then perform the ACS processing only to the available image area.